<title>旺进财</title>
#@homejs()
<body  bgcolor="#fafafa" style="margin:0px;">   
	#@homemenu("account")
	<div align="center" style="width:100%;">
		<div style="width:1190px;margin-top:20px;min-height:800px;">
			<div id="accountl" style="float:left;width:200px;background:#FFF;height:650px;border-top:3px solid #fd4255">
				<div style="padding:20px;">
					<div onclick="window.location.href='account-account'" style="cursor:pointer;font-size:20px;font-weight:400">
						<img style="height:20px;margin-right:10px;margin-top:-5px;" src="#(path)/assets/home/account/account_img1.png"> 
						<span>我的账户</span> 
					</div>
					<div accountinfo = "userinvest" class="account account_menu" > 
						<span>已投项目</span>
					</div>
					<div accountinfo = "investinfo" class="account account_menu" >
						<span>交易明细</span>
					</div>
					<div accountinfo = "usereward" class="account account_menu" >
						<span>我的奖励</span>
					</div>
					<div class="account" accountinfo = "userfriend" style="cursor:pointer;border-top:1px dashed #e0e0e0;margin-top:20px;padding-top:20px;font-size:20px;font-weight:400">
						<img style="height:20px;margin-right:10px;margin-top:-5px;" src="#(path)/assets/home/account/account_img2.png"> 
						<span >查看好友</span> 
					</div>
					<div class="account " accountinfo = "setaccount" style="cursor:pointer;border-top:1px dashed #e0e0e0;margin-top:20px;padding-top:20px;font-size:20px;font-weight:400">
						<img style="height:20px;margin-right:10px;margin-top:-5px;" src="#(path)/assets/home/account/account_img2.png"> 
						<span >账户设置</span>
					</div>
					<div style="cursor:pointer;border-top:1px dashed #e0e0e0;margin-top:20px;padding-top:20px;font-size:20px;font-weight:400">
						<img style="height:20px;margin-right:10px;margin-top:-5px;" src="#(path)/assets/home/account/account_img4.png"> 
						<span>我的消息</span>
					</div>
					<div accountinfo = "useractive" class="account account_menu" >
						<span>活动精选</span>
					</div>
					<div accountinfo = "usernotice" class="account account_menu" > 
						<span>通知消息</span>
					</div>
					<div accountinfo = "usernews" class="account account_menu" >
						<span>新闻公告</span>
					</div>
					<div accountinfo = "userasset" class="account account_menu" >
						<span>资产动态</span>
					</div>
					<div id="outsign" style="margin-left:20px;cursor:pointer;border-top:1px dashed #e0e0e0;margin-top:20px;padding-top:20px;font-size:20px;font-weight:400">
						<span>退出登录</span>
					</div>
				</div>
			
			</div>
			<div id="accountr" style="float:left;width:960px;margin-left:20px;min-height:600px;"> 
			</div>
			
		</div>
	</div>
	<div id="rechargemengban" hidden  style="background-color:rgba(0,0,0,0.4);position:fixed;top:0;width:100%;height:100%;z-index:550">
		<div align="center" style="width:100%;">
			<div style="width:1190px;font-size:14px;">
				<div style="width:600px;height:550px;position:relative;top:200px;background:#FFF">
					<!--充值-->
					<div style="height:40px;line-height:40px;background:#fafafa">
						<span style="font-size:20px;">充值</span>
						<img class="closethis" style="height:30px;float:right;margin-top:-10px;margin-right:-10px;" src="#(path)/assets/home/account/account_img18.png">
					</div>
					<div style="padding:20px;">
						<div align="center" style="width:400px;">
							<img style="height:20px;" src="#(path)/assets/home/account/account_img17.png">
							充值资金将进入您的旺进财个人账户
						</div>
						<div align="center" style="clear:both;height:50px;width:100%;margin-top:20px;">
							<div style="float:left;line-height:40px;font-size:16px;margin-left:80px;"><a>银行卡号</a></div>
							<div style="float:left;line-height:40px;margin-left:20px;">
								<input disabled id="userbankcard" type="text" style="font-size:16px;border:1px solid #dcdcdc;padding-left:20px;height:40px;width:220px">
								<span id="bankname"></span>
							</div> 
						</div>
						<span style="color:#f05f64">
							银行卡为您绑定的投资银行卡</br>
							单笔限<span id="single"></span>元,单日限<span id="day"></span>元
						</span>
						<div align="center" style="clear:both;height:50px;width:100%;margin-top:10px;"> 
							<div style="float:left;line-height:40px;font-size:16px;margin-left:80px;"><a>充值金额</a></div>
							<div style="float:left;line-height:40px;margin-left:20px;"> 
								<input id="rechargeNum"  placeholder="单笔不少于100元" type="text" style="font-size:16px;height:40px;border:1px solid #dcdcdc;padding-left:20px;width:220px">
							</div>
						</div>

						<div  style="width:400px;margin-top:20px;">
							<button id="recarge_truebt" style="cursor:pointer;background:#f15e64;border:0px;border-radius:5px;width:100px;height:40px;color:#FFF" >立即充值</button>
						</div> 
						<div  style="clear:both;width:100%;margin-top:10px;font-size:14px;">
							<div align="left" style="width:90%;line-height:20px;font-size:14px;">
								<div style="font-size:16px;font-weight:400;margin-bottom:10px;">【充值】温馨提示：</div> 
								<div>1.请确保您的银行卡余额大于或等您本次充值金额，余额不足请先补充金额后再次充值；</div>
								<div>2.每日及每笔充值限额依据各大银行限额为准，请注意您的银行卡充值限制；</div>
								<div>3.如果超过单笔充值限额，您可以拆分多次充值；</div>
								<div>4.单笔充值金额大于或等于100元；</div>  
								<div>5.充值不收取任何手续费；</div> 
								<div>6.如果存在银行卡状态异常情况，请联系银行做取消挂失或补卡处理；</div>
								<div>7.如果您在充值过程遇到任何问题请拨打客服热线【400-800-7118】或微信公众号【旺进财】联系我们，我们将竭诚为您服务。</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!--foot-->
	#@homefoot1()
	#@homefoot2() 
	<!--弹窗-->

<script> 
$(document).ready(function(){
	if("#(session.token??)"==""){
		layer.msg("这位客官，您还未登录，请先登录！", {icon:2,time:2000},function(){
			location.href="#(path)/user-login"; 
		});
	}else{
		ajax("#(path)/user/checkToken?token=#(session.token??)",{},function(data){
			if(data.msg=='TOKEN校验失败！'){
				layer.msg("您的账号在其他设备登录！如有疑问请拨打客服热线400-800-8117！", {icon:2,time:3000},function(){
					location.href="#(path)/user-login";
				});
			}else if(data.msg=='TOKEN超时！'){
				layer.msg("登陆超时，请重新登陆！", {icon:2,time:2000},function(){
					location.href="#(path)/user-login";
				});
			}else{ 
				var openkey = GetRequest().type; 
				if($.isBlank(openkey)){
					$("#accountr").load("/account-useraccount");
				}else{
					$("#accountr").load("/account-"+openkey);
				}
				$(".account").click(function(){
					$("#accountr").empty();
					$(".account").removeClass("account_menu2"); 
					$(this).addClass("account_menu2");
					day = $(this).attr("accountinfo");
					var href = "/account-"+day;
					$("#accountr").load(href);
				});
				$("#outsign").click(function(){
					$.getJSON("#(path)/user/logout?token=#(session.token??)", function(datainfo) {
						if(datainfo.code=='success'){
							layer.msg(datainfo.msg,{icon:1,time:2000},function(){
								window.location.href="#(path)/user-login"; 
							});
						}else{
							layer.msg(datainfo.msg,{icon:2,time:1000});  
						}
					});
				});
				$("#next").click(function(){
					var code = $("#code").val();
					var mobile = $("#mobile").html();
					//var question = $("#question").val(); 
					//var answer = $("#answer").val(); 
					$.getJSON("#(path)/user/modifyMobile?aes=0&token=#(session.token??)&type=check&sms="+code+"&mobile="+mobile+"&question="+question+"&answer="+answer, function(datainfo) {
						if(datainfo.code=='success'){
							layer.msg(datainfo.msg,{icon:1,time:2000},function(){
								window.location.href="#(path)/app/page/user-newmobile?type="+type+"&mobile1="+mobile+"&sms1="+code; 
							});
						}else{
							layer.msg(datainfo.msg,{icon:2,time:1000}); 
						}
					});
				}); 
				function GetRequest() {  
				   var url = location.search;   
				   var theRequest = new Object();  
				   if (url.indexOf("?") != -1) {  
					  var str = url.substr(1);  
					  strs = str.split("&");  
					  for(var i = 0; i < strs.length; i ++) {  
						 theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);  
					  }  
				   }  
				   return theRequest;  
				}  
			}
		});
	} 

});

	$.getJSON("#(path)/card/mainCard?aes=0&token=#(session.token??)", function(cardinfo) {
		if(!$.isBlank(cardinfo.data.card)){
			$("#day").html(cardinfo.data.card.day);
			$("#single").html(cardinfo.data.card.single); 
			$("#bankname").html(cardinfo.data.card.bank_name); 
		}
	});
	$.getJSON("#(path)/user/info?aes=0&token=#(session.token??)", function(recargeuserinfo) {
		var recargeuserinfo = recargeuserinfo.data.info;
		console.log(recargeuserinfo);
		$(".rechargebt").click(function(){
			if(recargeuserinfo.is_real_name_verify==0){
				layer.msg("您还未实名，不能充值！",{icon:2,time:2000},function(){
					window.location.href="/account-account?type=setaccount"; 
				}); 
			}else if(recargeuserinfo.is_bind_bank_card==0){
				layer.msg("您还未绑卡，不能充值！",{icon:2,time:2000},function(){
					window.location.href="/account-account?type=setaccount"; 
				}); 
			}else if(recargeuserinfo.is_set_pay_password==0){
				layer.msg("您还未设置支付密码！",{icon:2,time:2000},function(){
					window.location.href="/account-account?type=setaccount"; 
				}); 
			}else if(recargeuserinfo.is_withhold_authority==0){
				layer.msg("您还未设置委托扣款！",{icon:2,time:2000},function(){
					window.location.href="/account-account?type=setaccount"; 
				}); 
			}else{	
				$("#rechargemengban").show(); 
				$("#userbankcard").val(recargeuserinfo.bank_card.substr(0,4)+"********"+recargeuserinfo.bank_card.substr(15,19));
				$("#recarge_truebt").click(function(){
					var rechargeNum = $("#rechargeNum").val();
					if(rechargeNum < 100){
						layer.msg("充值金额不能少于100元",{icon:2,time:2000},function(){
							$("#rechargeNum").val(100);
						}); 
					}else{
						$.getJSON("#(path)/deposit?aes=0&token=#(session.token??)&ip=127.0.0.1&amount="+rechargeNum, function(datainfo) {
							if(datainfo.code=='success'){ 
								$("#rechargemengban").hide();
								window.open(datainfo.data.url);
								$("#recarge_truebt").attr("disabled","disabled"); 
								history.go(0);
							}else{
								layer.msg(datainfo.msg,{icon:2,time:2000}); 
							}
						}); 
					}
				});
			}
		});
	});
	$(".closethis").click(function(){
		$("#rechargemengban").hide();
	});

</script> 
#@userrealname()
#@userchangemobile()
#@userchangemail()
#@userchangeanswer()
#@withdraw() 
#@openaccount2() 
#@changepassword() 
#@changebankcard()
</body>